-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Red dot persists after removing phone number contact method #18473
Conversation
@pecanoro @rushatgabhane One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-05-09.at.10.02.40.moviOSScreen.Recording.2023-05-09.at.10.04.43.movAndroidScreen.Recording.2023-05-09.at.10.04.16.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pecanoro LGTM!
Merging! I tested it and it seems to be working well! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
HI, just found that this merge may be actually redundant. We have already fixed this on #18536. |
Oh well, both were happening at the same time, we should have caught this up when opening the bug reports. @s77rt I think maybe we just need to pay one bug report as it's exactly the same bug? Or do you think we should pay for both reports? We will be paying for both PRs though since the work is done already. |
@pecanoro On another similar scenario (don't have link now) we ended up paying both reporters. But this one seems a little different since the bug reporter is the same. I think the bug bounty should be paid once ($250). As for this PR, can you please revert it? Not only because it's redundant but it's following a "wrong" pattern: The login that we check here
But it's not, we check We should have called
|
I am not sure if I am following properly. Are you saying we should move |
This comment was marked as outdated.
This comment was marked as outdated.
@pecanoro If the other PR didn't exist, yes we should have moved that to line 83. A little more explanation on the wrong pattern here:
Now the issue is fixed already calling @Pujan92 Let me know if that ^ explained my point better. Or if I should elaborate more. |
@s77rt I think with only my change(wrong pattern as you mentioned) when we try to add the same phone number again it skips this part but it should not - due to the comparison of non-sms domain number with sms domain number. Logically it should navigate back from this condition but will not due to the above reason. App/src/pages/settings/Profile/Contacts/NewContactMethodPage.js Lines 85 to 89 in 802e406
Can't we merge these 3 lines directly with App/src/pages/settings/Profile/Contacts/NewContactMethodPage.js Lines 81 to 83 in 802e406
|
@Pujan92 I'm not sure you understood my point. Here is the workflow:
Here is what we are doing
|
@s77rt I understood your point and tried to provide an example for it(where it gets failed logically without any functional issue). |
At this point I don't think it will fail. I just pointed it as a "wrong" pattern. |
I meant if the other PR won't be there and only mine was merged then this logical issue may present. At this point, I agree it won't as we are adding the sms domain earlier to the given login value before the existence check within loginList. With that, I think we can revert this PR as seems not required now. |
@Pujan92 Can you create a revert PR then? We will still issue payment anyways as all the work was done when we realized about the duplicate. |
🚀 Deployed to staging by https://github.com/pecanoro in version: 1.3.13-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.13-5 🚀
|
Details
Added sms domain if the new contact method is phone number to prevent multiple keys creation in the onyx.
Fixed Issues
$ #17889
PROPOSAL: #17889 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Screen.Recording.2023-05-05.at.6.18.06.PM.mp4
Mobile Web - Chrome
abcd.webm
Mobile Web - Safari
Simulator.Screen.Recording.-.iPhone.14.-.2023-05-05.at.18.53.40.mp4
Desktop
Screen.Recording.2023-05-05.at.6.57.08.PM.mov
iOS
Simulator.Screen.Recording.-.iPhone.14.-.2023-05-05.at.18.50.24.mp4
Android
aancd.webm